﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DesignPattern.行为型模式.StrategyPattern
{
    public class StrategyPatternClient
    {

        public static void Run()
        {
            PersonContext person = new PersonContext(new TrainStrategy());
            person.Travel();
            //改变策略 坐飞机
            person.SetTraveStrategy(new AirPlanelStrategy());
            person.Travel();
        }
    }
}
